]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
tools/toolbox: Ignore missing config files
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 24 Mar 2026 00:37:36 +0000 (10:37 +1000)
committerMarge Bot <marge-bot@gnome.org>
Tue, 24 Mar 2026 23:45:02 +0000 (23:45 +0000)
The config file is created by our own create-toolbox.sh script which
sets the DEFAULT_TOOLBOX name. But for toolboxes created directly
that file doesn't exist, so let's skip over that (and thus require
the toolbox name to be given on the commandline or via an env var).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4152>

tools/toolbox/meson-build.sh
tools/toolbox/meson-test.sh
tools/toolbox/run-gnome-shell.sh
tools/toolbox/toolbox-sysext-install.sh

index 56eaf3ed3cc1491478a95d4f7f8d74f64222cdeb..82f388cdb6fead93503533ff42e7e9c89c59e1e3 100755 (executable)
@@ -74,7 +74,9 @@ dist_command() {
 }
 
 # load defaults
-. $CONFIG_FILE
+if [[ -e "$CONFIG_FILE" ]]; then
+  . $CONFIG_FILE
+fi
 TOOLBOX=$DEFAULT_TOOLBOX
 
 TEMP=$(getopt \
index 5ebc7072fb984ccd415c773f31803aec906ec8b9..9f28cb684de82ee5173fde015f4dd4b44d5b2f6f 100755 (executable)
@@ -47,7 +47,9 @@ find_toplevel() {
 }
 
 # load defaults
-. $CONFIG_FILE
+if [[ -e "$CONFIG_FILE" ]]; then
+  . $CONFIG_FILE
+fi
 TOOLBOX=$DEFAULT_TOOLBOX
 
 TEMP=$(getopt \
index 13ac238de3cadc5fc40fdf704590f779f816a562..2ae5b25a1d752aed6d1889487f5100487177371a 100755 (executable)
@@ -58,7 +58,9 @@ has_nested() {
 }
 
 # load defaults
-. $CONFIG_FILE
+if [[ -e "$CONFIG_FILE" ]]; then
+  . $CONFIG_FILE
+fi
 TOOLBOX=$DEFAULT_TOOLBOX
 
 SHELL_ENV=(XDG_CURRENT_DESKTOP=GNOME)
index 6310fb00e8a7e43f899575ef0a385a7e3369de81..d68af86411e28ee8141ceb21967aa4a7e6b6b86c 100755 (executable)
@@ -94,7 +94,9 @@ relabel_command() {
 }
 
 # load defaults
-. $CONFIG_FILE
+if [[ -e "$CONFIG_FILE" ]]; then
+  . $CONFIG_FILE
+fi
 TOOLBOX=$DEFAULT_TOOLBOX
 
 TEMP=$(getopt \